package com.qf.j2112.po;

import com.fasterxml.jackson.annotation.JsonFormat;
import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import java.util.Date;
import java.util.List;

@Data
@NoArgsConstructor
@AllArgsConstructor
public class Order {
    private String url= "http://8g878c.natappfree.cc";
    private Integer orderId;
    private Integer uid;
    private Integer isPay;
    @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8")
    private Date createTime;
    private Integer totalMoney;
    private Integer addrId;
    private String cdk;
    private String out_trade_no;

    //分割线--------------------------
    private List<OrderItem> items;

    private OrderStatus status;

    private SysUser user;

    private  Address address;

    private String cdkCode;

    public String getCdkCode() {
        return   "https://api.pwmqr.com/qrcode/create/?url="+this.url+"/api/getTicket/?cdk="+this.cdk;
    }
}
